/* =========================================================
   JUN · 全域设计师 — 个人作品集网站
   Design System / 全站样式
   ========================================================= */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease, opacity 0.25s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

/* ---------- Design Tokens ---------- */
:root {
  /* Color — 极简黑白灰 + 低饱和暖棕 */
  --bg:           #fafaf8;
  --surface:      #ffffff;
  --surface-2:    #f4f3f0;
  --ink:          #111111;
  --ink-2:        #2a2a2a;
  --muted:        #6b6b6b;
  --muted-2:      #9a9a9a;
  --border:       #e8e6e1;
  --border-2:     #d6d3cd;
  --accent:       #b08560;       /* 暖棕·低饱和 */
  --accent-soft:  #e7d9c8;
  --accent-deep:  #8a6644;
  --black:        #000000;
  --white:        #ffffff;

  /* Typography */
  --font-sans:   'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
                 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-serif:  'Times New Roman', 'Songti SC', 'STSong', serif;
  --font-mono:   'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;

  /* Type Scale */
  --fs-xs:    0.75rem;     /* 12 */
  --fs-sm:    0.875rem;    /* 14 */
  --fs-base:  1rem;        /* 16 */
  --fs-md:    1.125rem;    /* 18 */
  --fs-lg:    1.375rem;    /* 22 */
  --fs-xl:    1.75rem;     /* 28 */
  --fs-2xl:   2.25rem;     /* 36 */
  --fs-3xl:   3rem;        /* 48 */
  --fs-4xl:   clamp(2.5rem, 7vw, 5.5rem);
  --fs-hero:  clamp(2.8rem, 9vw, 7.5rem);

  /* Spacing */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  48px;
  --sp-8:  64px;
  --sp-9:  96px;
  --sp-10: 128px;

  /* Layout */
  --container:    1280px;
  --container-sm: 880px;
  --radius-sm:    2px;
  --radius:       4px;
  --radius-lg:    8px;

  /* Motion */
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:     cubic-bezier(0.4, 0, 1, 1);
  --dur-fast:    0.2s;
  --dur:         0.4s;
  --dur-slow:    0.7s;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.container-sm {
  width: 100%;
  max-width: var(--container-sm);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.section {
  padding: var(--sp-9) 0;
}

.section-lg {
  padding: var(--sp-10) 0;
}

@media (max-width: 768px) {
  .section      { padding: var(--sp-8) 0; }
  .section-lg   { padding: var(--sp-9) 0; }
  .container,
  .container-sm { padding: 0 var(--sp-5); }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.h-hero {
  font-size: var(--fs-hero);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.h-section {
  font-size: var(--fs-3xl);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.h-block {
  font-size: var(--fs-xl);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-4);
  display: inline-block;
}

.lead {
  font-size: var(--fs-md);
  color: var(--muted);
  line-height: 1.7;
  max-width: 60ch;
}

/* 多段落说明文案（blurb 内用 \n 分段时保留换行） */
.lead--multi { max-width: 68ch; }
.lead--multi span.blk { display: block; }
.lead--multi span.blk + span.blk { margin-top: 0.9em; }

.muted { color: var(--muted); }
.accent { color: var(--accent); }

.divider {
  height: 1px;
  background: var(--border);
  margin: var(--sp-7) 0;
  border: none;
}

/* ---------- Top Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}

.nav.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(250, 250, 248, 0.95);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__brand {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-weight: 500;
  font-size: var(--fs-md);
  letter-spacing: 0.02em;
}

.nav__brand-mark {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.5em;
  color: var(--accent);
  line-height: 1;
}

.nav__brand-text { letter-spacing: 0.04em; }

.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.nav__link {
  font-size: var(--fs-sm);
  color: var(--ink-2);
  position: relative;
  padding: 4px 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--ink);
  transition: width var(--dur) var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--ink);
}

.nav__link.is-active::after,
.nav__link:hover::after {
  width: 100%;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
  cursor: pointer;
  user-select: none;
}

.lang-switch:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.lang-switch__opt {
  padding: 0 4px;
  color: var(--muted);
}

.lang-switch__opt.is-active {
  color: var(--ink);
}

.lang-switch__sep {
  color: var(--border-2);
}

.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: transform var(--dur) var(--ease);
}

.nav__toggle span::before,
.nav__toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform var(--dur) var(--ease), top var(--dur) var(--ease);
}

.nav__toggle span::before { top: -7px; }
.nav__toggle span::after  { top:  7px; }

.nav.is-open .nav__toggle span            { background: transparent; }
.nav.is-open .nav__toggle span::before    { top: 0; transform: rotate(45deg); }
.nav.is-open .nav__toggle span::after     { top: 0; transform: rotate(-45deg); }

@media (max-width: 880px) {
  .nav__menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--sp-6) var(--sp-6) var(--sp-7);
    gap: var(--sp-4);
    transform: translateY(-110%);
    transition: transform var(--dur) var(--ease);
  }
  .nav.is-open .nav__menu { transform: translateY(0); }
  .nav__toggle { display: flex; }
  .nav__menu .nav__link { font-size: var(--fs-md); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: 14px 28px;
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  background: var(--white);
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--white);
}

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
}

.btn--accent:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--white);
}

.btn--lg {
  padding: 18px 36px;
  font-size: var(--fs-base);
}

.btn__arrow {
  display: inline-block;
  transition: transform var(--dur) var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(72px + var(--sp-10));
  padding-bottom: var(--sp-10);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero__title {
  margin-bottom: var(--sp-7);
}

.hero__title .accent {
  font-style: italic;
  font-family: var(--font-serif);
  font-weight: 400;
}

.hero__sub {
  font-size: var(--fs-md);
  color: var(--ink-2);
  line-height: 1.7;
  max-width: 60ch;
  margin-bottom: var(--sp-7);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.hero__meta-item strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .hero { min-height: auto; padding-top: calc(72px + var(--sp-8)); padding-bottom: var(--sp-8); }
}

/* ---------- Section Header ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--sp-6);
  margin-bottom: var(--sp-8);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.section-head__title { max-width: 30ch; }

.section-head__meta {
  color: var(--muted);
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .section-head { flex-direction: column; align-items: flex-start; }
}

/* ---------- Cards / Works Grid ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-7) var(--sp-5);
}

@media (max-width: 1024px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .works-grid { grid-template-columns: 1fr; gap: var(--sp-7); }
}

.work-card {
  display: block;
  cursor: pointer;
  transition: transform var(--dur) var(--ease);
}

.work-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: var(--sp-4);
}

.work-card__media img,
.work-card__media svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}

.work-card:hover .work-card__media img,
.work-card:hover .work-card__media svg {
  transform: scale(1.03);
}

.work-card__tag {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  padding: 4px 10px;
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

.work-card__title {
  font-size: var(--fs-md);
  font-weight: 500;
  margin-bottom: 4px;
}

.work-card__meta {
  font-size: var(--fs-xs);
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Filter Tabs ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-7);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  padding: 8px 16px;
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-2);
  background: transparent;
  transition: border-color var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}

.filter-btn:hover { border-color: var(--ink); color: var(--ink); }

.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

/* ---------- About / Two-column ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--sp-9);
  align-items: flex-start;
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: var(--sp-7); }
}

.timeline {
  border-top: 1px solid var(--border);
}

.timeline__item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--sp-5);
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--border);
}

.timeline__year {
  color: var(--muted);
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

.timeline__title { font-weight: 500; margin-bottom: 4px; }
.timeline__desc  { color: var(--muted); font-size: var(--fs-sm); }

@media (max-width: 640px) {
  .timeline__item { grid-template-columns: 1fr; gap: var(--sp-2); }
}

/* ---------- Service cards ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
}

@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  padding: var(--sp-7) var(--sp-6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.service-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.service-card__num {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-4);
}

.service-card__title { margin-bottom: var(--sp-3); }

.service-card__desc {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-9);
}

@media (max-width: 900px) {
  .skills-grid { grid-template-columns: 1fr; gap: var(--sp-7); }
}

.skill-group {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-5);
}

.skill-list { margin-top: var(--sp-4); }

.skill-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
}

.skill-list li span:first-child { color: var(--ink); }
.skill-list li span:last-child  { color: var(--muted); font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.1em; }

.tools {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}

.tool-pill {
  padding: var(--sp-4) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  text-align: center;
  transition: border-color var(--dur) var(--ease);
}

.tool-pill:hover { border-color: var(--ink); }

/* ---------- Contact Form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--sp-9);
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--sp-7); }
}

.contact-info { padding-top: var(--sp-3); }

.contact-info dl { margin-top: var(--sp-6); }

.contact-info dt {
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.contact-info dd {
  margin-bottom: var(--sp-5);
  font-size: var(--fs-md);
  font-weight: 500;
}

.form { display: flex; flex-direction: column; gap: var(--sp-5); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-field { display: flex; flex-direction: column; gap: var(--sp-2); }

.form-field label {
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-field input,
.form-field textarea,
.form-field select {
  padding: var(--sp-3) 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-2);
  outline: none;
  font-size: var(--fs-base);
  transition: border-color var(--dur) var(--ease);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { border-bottom-color: var(--ink); }

.form-field textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.form-msg {
  font-size: var(--fs-sm);
  margin-top: var(--sp-4);
  color: var(--accent-deep);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.form-msg.is-show { opacity: 1; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-7) 0;
  background: var(--bg);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.footer__links {
  display: flex;
  gap: var(--sp-5);
}

.footer__links a:hover { color: var(--ink); }

/* ---------- Reveal on scroll ----------
   渐进增强：只有 JS 可用时才初始隐藏，
   避免脚本加载失败导致全站内容不可见 */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease);
  will-change: opacity, transform;
}

.js .reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Work Detail Page ---------- */
.work-hero {
  padding-top: calc(72px + var(--sp-9));
  padding-bottom: var(--sp-7);
}

.work-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-7);
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
}

.work-hero__meta dt {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.work-hero__meta dd { font-weight: 500; }

.work-cover {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: var(--sp-9);
}

.work-cover img,
.work-cover video,
.work-cover svg { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }

.work-body h3 {
  margin: var(--sp-7) 0 var(--sp-3);
  font-size: var(--fs-lg);
}

.work-body p { margin-bottom: var(--sp-4); color: var(--ink-2); }

/* 图集：瀑布流。作品页横竖尺寸混杂（VI 16:9、手册 A4 竖、IP 方图），
   固定比例裁切会切掉内容，所以用列布局保留原始比例。 */
.work-gallery {
  columns: 2;
  column-gap: var(--sp-4);
  margin: var(--sp-5) 0 0;
}

.work-gallery img,
.work-gallery video,
.work-gallery svg {
  width: 100%;
  height: auto;
  display: block;
  break-inside: avoid;
  margin-bottom: var(--sp-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: zoom-in;
  transition: opacity var(--dur) var(--ease);
}

.work-gallery img:hover { opacity: 0.86; }
.work-gallery video { cursor: pointer; background: #000; }

/* 单列无缝：用于「按顺序竖排复原」的长图/切图作品（如 App 概念设计切图序列） */
.work-gallery.is-single { columns: 1; }
.work-gallery.is-single img,
.work-gallery.is-single video {
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
}

@media (max-width: 640px) {
  .work-gallery { columns: 1; }
}

/* 交付内容 */
.work-scope {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-5) 0;
  margin-bottom: var(--sp-9);
}

.work-scope p {
  margin-top: 8px;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}

/* 图集灯箱 */
.lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(14, 14, 14, 0.94);
  cursor: zoom-out;
}

.lb.is-on { display: flex; }

.lb img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.lb__cap {
  position: absolute;
  bottom: 2.5vh;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}

.work-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: var(--sp-6);
  margin-top: var(--sp-9);
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.work-nav a:hover { color: var(--accent); }

/* ---------- Resume ---------- */
.resume-card {
  border: 1px solid var(--border);
  padding: var(--sp-7) var(--sp-6);
  border-radius: var(--radius);
  margin-bottom: var(--sp-5);
}

.resume-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.resume-card__title { font-size: var(--fs-md); font-weight: 500; }

.resume-card__org  { color: var(--muted); font-size: var(--fs-sm); }
.resume-card__date { color: var(--muted); font-size: var(--fs-xs); letter-spacing: 0.08em; font-family: var(--font-mono); }

.resume-body { margin-top: var(--sp-5); font-size: 16px; line-height: 1.8; }
.resume-body p + p { margin-top: 0.9em; }

.resume-card ul { margin-top: var(--sp-3); padding-left: var(--sp-4); }
.resume-card ul li { list-style: disc; color: var(--muted); font-size: var(--fs-sm); line-height: 1.7; margin-bottom: 4px; }

/* ---------- Grid utilities (响应式，勿用内联 grid-template-columns 覆盖) ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-7) var(--sp-5);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5) var(--sp-7);
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; gap: var(--sp-7); }
}

@media (max-width: 700px) {
  .grid-2 { grid-template-columns: 1fr; gap: var(--sp-5); }
}

/* ---------- Misc ---------- */
.text-center { text-align: center; }
.flex-center { display: flex; justify-content: center; }

.mt-5 { margin-top: var(--sp-5); }
.mt-7 { margin-top: var(--sp-7); }
.mt-9 { margin-top: var(--sp-9); }
.mb-5 { margin-bottom: var(--sp-5); }

/* ---------- Print / a11y ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

/* ---------- Utilities ---------- */
/* 注意：i18n 注入会重置元素的**内联** style.display，
   所以任何「默认隐藏」的元素必须用 class，不能写 style="display:none"。 */
.is-hidden { display: none !important; }
/* =========================================================
   后台新增能力：视频媒体 / 灯箱视频 / 背景音乐
   ========================================================= */

.lb video {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 4px;
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}
.lb img.is-hidden,
.lb video.is-hidden { display: none; }

.bgm-btn {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid var(--border-2);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.bgm-btn:hover { color: var(--ink); border-color: var(--ink); }
.bgm-btn.is-on { color: var(--accent-deep); border-color: var(--accent); }
.bgm-btn__ico { font-size: 14px; line-height: 1; }
.bgm-btn.is-on .bgm-btn__ico { animation: bgmPulse 1.6s ease-in-out infinite; }

@keyframes bgmPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

@media (max-width: 640px) {
  .bgm-btn { left: 12px; bottom: 12px; height: 32px; padding: 0 12px; }
}


/* ---------- 二维码弹层（社交入口 kind=qr） ---------- */
a.has-qr { border-bottom: 1px dotted currentColor; cursor: pointer; }

.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: rgba(17, 17, 17, 0.72);
}
.qr-overlay.is-on { display: flex; }
.qr-overlay__box {
  position: relative;
  width: 100%;
  max-width: min(92vw, 400px);
  padding: 30px 28px 24px;
  background-color: var(--bg);
  border-radius: var(--radius-lg);
  text-align: center;
}
.qr-overlay__close {
  position: absolute;
  top: 6px;
  right: 10px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.qr-overlay__img {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 4px auto 0;
  border-radius: var(--radius);
  /* 保证手机长按能呼出「识别图中二维码」 */
  -webkit-user-select: auto;
  user-select: auto;
  -webkit-touch-callout: default;
  touch-action: manipulation;
}
.qr-overlay__label {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.qr-overlay__hint {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
.qr-overlay__open {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
}
body.is-qr-open { overflow: hidden; }
