/* ============================================================
   个人网站 · 柔和编辑风（蜜桃衬线）
   改配色 → 改最上面的 :root 变量。
   ============================================================ */

:root {
  --bg: #fbf3ee;
  --bg-soft: #f7e9e1;
  --surface: #fffaf6;
  --ink: #40302a;
  --ink-2: #5d4840;
  --muted: #74605a;
  --accent: #a94f35;
  --accent-soft: #f5e0d5;
  --line: #eddcd1;
  --radius: 20px;
  --radius-sm: 14px;
  --max: 1040px;
  --pad: 28px;
  --shadow: 0 20px 45px -32px rgba(110, 60, 40, 0.45);
  --shadow-hover: 0 30px 55px -32px rgba(110, 60, 40, 0.5);
  --ease: cubic-bezier(0.22, 0.7, 0.3, 1);
  --serif: Georgia, "Songti SC", "Noto Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(
    960px 620px at 50% -12%,
    #f9e3d7,
    rgba(249, 227, 215, 0) 62%
  );
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 0;
  top: -100px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  border-radius: 0 0 10px 0;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0;
}

h1,
h2,
h3,
p,
.hero-name,
.detail-title,
.page-title,
.card-title {
  overflow-wrap: anywhere;
}

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

/* ---------------- 顶栏 ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 243, 238, 0.72);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.4em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: background 0.25s var(--ease), color 0.25s;
}

.nav-link:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  background: none;
  border: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---------------- 首屏 ---------------- */

.hero {
  position: relative;
  text-align: center;
  padding-block: 86px 66px;
}

.avatar {
  width: 108px;
  height: 108px;
  margin: 0 auto 28px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  border: 5px solid #fff8f3;
  box-shadow: 0 18px 38px -22px rgba(110, 60, 40, 0.55);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-title {
  font-size: 12.5px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.hero-name {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(46px, 7vw, 82px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.hero-tagline {
  margin: 18px auto 0;
  max-width: 24em;
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.65;
  color: var(--ink-2);
}

.hero-location {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 14px 26px -18px rgba(120, 70, 40, 0.7);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -18px rgba(120, 70, 40, 0.75);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-2);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--ink);
  box-shadow: none;
}

/* ---------------- 区块 ---------------- */

.section {
  padding-block: 56px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--muted);
  white-space: nowrap;
}

.label::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.section-head .rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--line), rgba(237, 220, 209, 0));
}

.section-head .idx {
  font-family: var(--serif);
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.prose p {
  max-width: 64ch;
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--ink-2);
}

.prose p + p {
  margin-top: 1.05em;
}

/* ---------------- 能力 ---------------- */

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-2);
  transition: transform 0.2s var(--ease), background 0.2s;
}

.skill:hover {
  transform: translateY(-1px);
  background: #fff;
}

/* ---------------- 经历 ---------------- */

.exp-list {
  display: grid;
  gap: 14px;
}

.exp {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 22px;
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.exp-period {
  font-family: var(--serif);
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}

.exp-role {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}

.exp-desc {
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------------- 作品卡片 ---------------- */

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 22px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.card:hover .card-cover img {
  transform: scale(1.04);
}

.cover-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-shade {
  position: absolute;
  inset: 0;
  background: rgba(64, 38, 28, 0);
  transition: background 0.35s var(--ease);
  pointer-events: none;
}

.card:hover .card-shade {
  background: rgba(64, 38, 28, 0.12);
}

.card-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease);
  filter: drop-shadow(0 8px 18px rgba(60, 30, 20, 0.3));
}

.card-play svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card:hover .card-play,
.card-play:focus-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (hover: none) {
  .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.card-duration {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(64, 38, 28, 0.7);
  color: #fff;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}

.card-body {
  padding: 16px 18px 20px;
}

.card-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.card-title a {
  transition: color 0.25s;
}

.card:hover .card-title a {
  color: var(--accent);
}

.card-meta {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.card-meta .dot {
  margin: 0 6px;
  opacity: 0.6;
}

.more-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 28px;
}

.more-link {
  font-size: 13.5px;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 2px;
}

.more-link:hover {
  border-color: var(--accent);
}

/* ---------------- 空状态 ---------------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 64px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  background: rgba(255, 250, 246, 0.6);
}

.empty strong {
  display: block;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-2);
}

.empty span {
  font-size: 13.5px;
}

/* ---------------- 联系卡片 ---------------- */

.contact {
  padding-block: 56px 92px;
}

.contact-card {
  padding: 44px 32px 40px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}

.contact-card .label {
  display: flex;
  justify-content: center;
}

.contact-mail {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(24px, 3.6vw, 38px);
  font-weight: 600;
  letter-spacing: -0.01em;
  border-bottom: 2px solid var(--accent-soft);
  padding-bottom: 4px;
  transition: color 0.25s, border-color 0.25s;
  overflow-wrap: anywhere;
}

.contact-mail:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.contact-links a {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
  transition: background 0.25s, color 0.25s;
}

.contact-links a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.qr {
  width: 104px;
  height: 104px;
  margin: 22px auto 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

/* ---------------- 页脚 ---------------- */

.site-footer {
  padding: 28px 0 44px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
}

/* ---------------- 页面标题 ---------------- */

.page-head {
  padding: 68px 0 30px;
}

.page-title {
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

.page-sub {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------------- 筛选 ---------------- */

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip {
  padding: 7px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s var(--ease);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.chip-sub {
  padding: 5px 14px;
  font-size: 13px;
  color: var(--muted);
}

.chip-sub.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.works-count {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 18px;
}

/* ---------------- 详情页 ---------------- */

.detail {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 0 96px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 32px;
  transition: color 0.2s;
}

.back:hover {
  color: var(--accent);
}

.detail-title {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.015em;
}

.detail-meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.detail-summary {
  margin-top: 20px;
  font-size: 17.5px;
  color: var(--ink-2);
  max-width: 60ch;
}

.video-wrap {
  margin-top: 32px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #1b110d;
  box-shadow: 0 24px 50px -30px rgba(90, 50, 30, 0.55);
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.video-empty {
  margin-top: 32px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13.5px;
  background: var(--bg-soft);
}

.detail-body {
  margin-top: 38px;
}

.detail-body p {
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--ink-2);
  max-width: 64ch;
}

.detail-body p + p {
  margin-top: 1.1em;
}

.gallery {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gallery button {
  padding: 0;
  border: 0;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.gallery button:hover img {
  transform: scale(1.04);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

/* ---------------- 弹层 ---------------- */

.modal,
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.modal[hidden],
.lightbox[hidden] {
  display: none;
}

.modal-backdrop,
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(48, 28, 20, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 0;
  cursor: zoom-out;
}

.modal-panel {
  position: relative;
  width: min(960px, 100%);
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(40, 20, 12, 0.6);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(48, 28, 20, 0.55);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(48, 28, 20, 0.85);
}

.modal-video {
  aspect-ratio: 16 / 9;
  background: #000;
}

.modal-video video {
  width: 100%;
  height: 100%;
  display: block;
}

.modal-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
}

.modal-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}

.modal-meta {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}

.modal-detail {
  font-size: 13.5px;
  color: var(--accent);
  white-space: nowrap;
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 2px;
}

.modal-detail:hover {
  border-color: var(--accent);
}

.lightbox img {
  position: relative;
  z-index: 2;
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 70px -20px rgba(40, 20, 12, 0.65);
}

/* ---------------- 入场 ---------------- */

.fade-up {
  animation: fadeUp 0.7s var(--ease) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ---------------- 响应式 ---------------- */

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

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  :root {
    --pad: 20px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 20px 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 13px 4px;
    border-radius: 0;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
  }

  .nav-link:last-child {
    border-bottom: 0;
  }

  .nav-link.is-active {
    background: transparent;
    color: var(--accent);
  }

  .hero {
    padding-block: 44px 48px;
  }

  .avatar {
    width: 88px;
    height: 88px;
    margin-bottom: 22px;
  }

  .section {
    padding-block: 42px;
  }

  .exp {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 18px 20px;
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .page-head {
    padding: 40px 0 24px;
  }

  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .chips::-webkit-scrollbar {
    display: none;
  }

  .detail {
    padding: 32px 0 72px;
  }

  .gallery {
    gap: 8px;
  }

  .contact {
    padding-block: 42px 72px;
  }

  .contact-card {
    padding: 34px 18px 30px;
    border-radius: 22px;
  }

  .modal,
  .lightbox {
    padding: 0;
  }

  .modal-panel {
    width: 100%;
    border-radius: 0;
    background: #1b110d;
  }

  .modal-info {
    background: var(--bg);
  }

  .modal-close {
    top: 8px;
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
