/* ============================================================
   ZONGWEI.ME — PORTFOLIO STYLES
   Design: architectural, black-line grid, off-white background
   ============================================================ */

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

/* ---------- FONTS ---------- */
@font-face {
  font-family: 'LXGW WenKai';
  src: url('../LXGWWenKai-Light.woff2') format('woff2'),
       url('../LXGWWenKai-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: block;
}

/* ---------- CUSTOM PROPERTIES ---------- */
:root {
  --color-bg: #F8F7F3;
  --color-text: #1a1a1a;
  --color-muted: #555555;
  --color-line: #1a1a1a;
  --color-overlay: rgba(0, 0, 0, 0.85);
  --font-serif: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-futura: 'Futura', 'Futura Now', 'Jost', -apple-system, sans-serif;
  --max-width: 1200px;
  --max-width-narrow: 720px;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 60px;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
  list-style: none;
}

/* ---------- CONTAINER ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

/* ---------- SECTION ---------- */
.section {
  padding: 100px 0;
  border-bottom: 1px solid var(--color-line);
}

.section--last {
  border-bottom: none;
}

.section__title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 600;
  margin-bottom: 48px;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
}

/* ============================================================
   DIVIDER — horizontal black line
   ============================================================ */
.divider {
  border: none;
  border-top: 1px solid var(--color-line);
  margin: 0;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-line);
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav--visible {
  transform: translateY(0);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 64px;
}

.nav__logo {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nav__links {
  display: flex;
  gap: 32px;
}

.nav__link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  transition: color var(--transition-fast);
  position: relative;
}

.nav__link:hover {
  color: var(--color-text);
}


/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero .container {
  padding: 100px 0 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__name {
  font-family: "LXGW WenKai", var(--font-serif);
  font-size: clamp(48px, 7vw, 80px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--color-text);
  text-align: center;
  white-space: nowrap;
}

.hero__char {
  position: relative;
  display: inline-block;
  margin: 0 0.15em;
}

.hero__char-ghost {
  line-height: 1;
  visibility: hidden;
}

/* 18 列文字切片层 */
.hero__char-slices {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero__char-slice {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  line-height: 1;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  opacity: 0;
  animation: sliceReveal 0.15s ease-out forwards;
  animation-delay: var(--slice-delay, 0s);
}

@keyframes sliceReveal {
  0%   { opacity: 0; transform: translateY(var(--tear-y, 0px)); }
  25%  { opacity: 1; transform: translateY(calc(var(--tear-y, 0px) * 0.6)); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero__particles {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 100%;
  height: 1%;
}

.hero__particle {
  /* 透明层：不遮盖文字，只承载动画 */
  opacity: 0;
  animation: particleSweep 0.05s ease-out forwards;
  animation-delay: var(--delay, 0s);
  animation-fill-mode: forwards;
}

/* 扫过后立即消失，只留扫掠边缘可见 */
@keyframes particleSweep {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* 粒子闪绿色光后消失 — 已隐藏 */
.hero__particle--glitch {
  display: none;
}

@keyframes particleGlitch {
  0%   { opacity: 1; background: var(--g, #8B9D18); box-shadow: 0 0 3px var(--g, #8B9D18); }
  100% { opacity: 0; }
}

/* 乱码粒子：黑方块 + Matrix 风绿色字符，仅此类型可见 */
.hero__particle--mojibake {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  font-size: 6px;
  line-height: 1;
  color: #8B9D18;
  background: #FDF6E3;
  opacity: 0;
  animation: mojibakeFlash 0.05s ease-out forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes mojibakeFlash {
  0%   { opacity: 1; color: #8B9D18; text-shadow: 0 0 10px #8B9D18, 0 0 20px #8B9D18; }
  50%  { opacity: 1; color: #9aad20; text-shadow: 0 0 14px #9aad20, 0 0 28px #9aad20; }
  100% { opacity: 0; color: #7a8a10; text-shadow: 0 0 8px #7a8a10; }
}

/* ============================================================
   赛博霓虹 idle — 签名特效结束 1s 后触发
   ============================================================ */
.hero__name--glitch .hero__char-slice--cyber {
  animation: cyberGlitch 0.12s infinite alternate;
  animation-delay: var(--glitch-delay, 0s);
}

@keyframes cyberGlitch {
  0% {
    opacity: 1;
    color: var(--cyber-color, #0ff);
    transform: translateY(calc(var(--perm-y, 0px) + 2px));
    text-shadow: 3px 0 #0ff, -3px 0 #f0f;
  }
  33% {
    opacity: 1;
    color: var(--cyber-color, #ff0);
    transform: translateY(calc(var(--perm-y, 0px) - 3px));
    text-shadow: -2px 0 #0ff, 2px 0 #f0f;
  }
  66% {
    opacity: 1;
    color: var(--cyber-color, #f0f);
    transform: translateY(calc(var(--perm-y, 0px) + 1px));
    text-shadow: 4px 0 #0ff, -2px 0 #ff0;
  }
  100% {
    opacity: 1;
    color: var(--cyber-color, #8B9D18);
    transform: translateY(calc(var(--perm-y, 0px) - 1px));
    text-shadow: -3px 0 #0ff, 3px 0 #f0f;
  }
}

/* ============================================================
   切片飞出消失 — 2s 后触发
   ============================================================ */
.hero__name--exit .hero__char-slice {
  animation: sliceFlyOut 0.5s ease-in forwards;
  animation-delay: var(--exit-delay, 0s);
}

/* cyber 切片：glitch 颜色 + 飞出位移同时进行 */
.hero__name--exit .hero__char-slice--cyber {
  animation: cyberGlitch 0.12s infinite alternate, sliceFlyOut 0.5s ease-in forwards;
  animation-delay: 0s, var(--exit-delay, 0s);
}

@keyframes sliceFlyOut {
  0%   { opacity: 1; transform: translate(0, 0); }
  100% { opacity: 0; transform: translate(0, var(--fly-y, -120vh)); }
}

/* ============================================================
   INTRO
   ============================================================ */
.intro {
  border-top: 1px solid var(--color-line);
}

.intro__text {
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.8;
  color: var(--color-muted);
  margin-bottom: 48px;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.skills--about {
  margin-top: 36px;
}

.skills__group {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.skills__label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  min-width: 100px;
  padding-top: 4px;
}

.skills__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 5px 15px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  background: transparent;
  border: 1px solid var(--color-line);
  transition: background var(--transition-fast);
}

.tag:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* ---------- Works Header ---------- */
.works-header {
  padding: 64px 0;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  text-align: center;
}

.works-header .section__title {
  margin-bottom: 0;
}

/* ============================================================
   WORKS — Full-viewport hero + bottom grid
   ============================================================ */
.works {
  /* border-top handled by .section above */
}

/* ---------- Tabs ---------- */
.works__tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-line);
  padding: 0 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.works__tab {
  padding: 18px 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  background: none;
  border: none;
  border-bottom: 1.5px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  margin-right: 36px;
  letter-spacing: 0.02em;
}

.works__tab:hover {
  color: var(--color-text);
}

.works__tab--active {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

/* ---------- Heroes Grid ---------- */
#worksHeroes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

/* ---------- Full-viewport Hero Card ---------- */
.work-hero {
  position: relative;
  height: 66svh;
  min-height: 360px;
  max-height: 600px;
  background-size: auto 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-line);
  border-right: 1px solid var(--color-line);
  overflow: hidden;
}

.work-hero:nth-child(3n) {
  border-right: none;
}

.work-hero__overlay {
  position: sticky;
  top: 64px;
  padding: 24px 32px 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.work-hero__overlay--center {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.work-hero__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.work-hero__tag {
  background: var(--color-bg);
  font-size: 12px;
  padding: 4px 12px;
  pointer-events: none;
}

.work-hero__tag:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.work-hero__year {
  font-family: var(--font-futura);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-text);
}

.work-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.5vw, 2.2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.work-hero__title-inner {
  display: inline;
  background: var(--color-bg);
  padding: 0 4px 0 0;
}

.work-hero__subtitle {
  font-family: var(--font-sans);
  font-size: clamp(0.8rem, 1.1vw, 0.95rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-muted);
  margin-top: 8px;
  max-width: 360px;
}

.work-hero__coming-soon-icon {
  display: block;
  width: 80%;
  max-width: 700px;
  height: auto;
  margin: 0 auto 20px;
}

.work-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.work-hero__tags .tag {
  background: var(--color-bg);
}

.work-hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  opacity: 0.6;
  letter-spacing: 0.06em;
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.work-hero__scroll:hover {
  opacity: 1;
}

.work-hero__scroll-arrow {
  width: 20px;
  height: 20px;
}

/* ---------- More Projects Grid ---------- */
.works__more {
  border-bottom: 1px solid var(--color-line);
}

.works__more-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  padding: 48px 0 32px;
  letter-spacing: -0.01em;
}

.works__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.works__card {
  display: block;
  border-top: 1px solid var(--color-line);
  border-right: 1px solid var(--color-line);
  cursor: pointer;
  transition: opacity var(--transition-fast);
  position: relative;
}

.works__card:nth-child(3n) {
  border-right: none;
}

.works__card:hover {
  opacity: 0.8;
}

.works__card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.works__card-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #d5d2c8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b0ada5;
  font-size: 36px;
  font-family: var(--font-serif);
}

.works__card-label {
  padding: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

/* ---------- PROJECTS (old) — keep for project.html detail page ---------- */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  position: relative;
}

/* Vertical line between the two columns */
.projects__grid::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--color-line);
  transform: translateX(-50%);
}

/* ---------- PROJECT CARD ---------- */
.card {
  cursor: pointer;
  background: transparent;
  transition: opacity var(--transition-fast);
}

.card:hover {
  opacity: 0.85;
}

.card__thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e0ddd5;
  display: block;
  border-bottom: 1px solid var(--color-line);
}

/* Placeholder for missing images */
.card__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e0ddd5;
  color: #b0ada5;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.card__body {
  padding: 20px 0 0;
}

.card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.card__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

.card__year {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-muted);
}

.card__title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

/* Open button */
.card__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-line);
  cursor: pointer;
  transition: opacity var(--transition-fast);
  letter-spacing: 0.02em;
}

.card__btn:hover {
  opacity: 0.6;
}

.card__btn-arrow {
  font-size: 16px;
  transition: transform var(--transition-fast);
}

.card__btn:hover .card__btn-arrow {
  transform: translateX(3px);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--color-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-overlay.is-closing {
  opacity: 0;
}

.modal {
  position: relative;
  width: 92vw;
  max-width: 1200px;
  height: 88vh;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  overflow: hidden;
  transform: scale(0.92);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.is-open .modal {
  transform: scale(1);
}

.modal-overlay.is-closing .modal {
  transform: scale(0.92);
}

/* Close button */
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-line);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.modal__close:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.modal__close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
}

/* Project info bar */
.modal__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 16px 24px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-line);
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}

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

.modal__info-year {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted);
}

/* Figma iframe */
.modal__iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Body scroll lock when modal is open */
body.modal-open {
  overflow: hidden;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about.section {
  border-bottom: 1px solid var(--color-line);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: start;
}

.about__photo {
  position: sticky;
  top: 100px;
  padding-right: 40px;
  border-right: 1px solid var(--color-line);
}

.about__photo img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
}

.about__photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #e0ddd5;
  border: 1px solid var(--color-line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b0ada5;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.about__content {
  padding-left: 40px;
}

.about__name {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.about__role {
  font-size: 17px;
  color: var(--color-muted);
  margin-bottom: 32px;
}

.about__bio {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.about__bio p {
  font-size: 16px;
  line-height: 1.75;
  color: #444;
}

/* ============================================================
   PROJECT DETAIL PAGE
   ============================================================ */

/* Hero block */
.project-hero {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--color-line);
}

.project-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  margin-bottom: 40px;
  transition: color var(--transition-fast);
}

.project-hero__back:hover {
  color: var(--color-text);
}

.project-hero__back-arrow {
  font-size: 15px;
}

.project-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.project-hero__intro {
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.75;
  color: var(--color-muted);
  max-width: 640px;
  margin-bottom: 24px;
}

.project-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Overview bar */
.project-overview {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid var(--color-line);
}

.project-overview__item {
  padding: 28px 32px;
  border-right: 1px solid var(--color-line);
}

.project-overview__item:last-child {
  border-right: none;
}

.project-overview__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.project-overview__value {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

/* Content section */
.project-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--color-line);
}

.project-section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.project-section__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 16px;
}

.project-section__title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.project-section__body {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  max-width: 640px;
}

.project-section__body p + p {
  margin-top: 16px;
}

/* Images */
.project-images {
  margin-top: 40px;
  display: grid;
  gap: 24px;
}

.project-images--2col {
  grid-template-columns: 1fr 1fr;
}

.project-images--1col {
  grid-template-columns: 1fr;
}

.project-images__item {
  border: 1px solid var(--color-line);
}

.project-images__item img {
  width: 100%;
  display: block;
}

.project-images__caption {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--color-muted);
  border-top: 1px solid var(--color-line);
  background: var(--color-bg);
}

/* Embed (YouTube / Figma) */
.project-embed {
  margin-top: 40px;
  border: 1px solid var(--color-line);
  aspect-ratio: 16 / 9;
}

.project-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Bottom back link */
.project-back {
  padding: 48px 0;
  text-align: center;
  border-bottom: 1px solid var(--color-line);
}

.project-back__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-muted);
  transition: color var(--transition-fast);
}

.project-back__link:hover {
  color: var(--color-text);
}

/* Not found */
.project-notfound {
  padding: 160px 0;
  text-align: center;
}

.project-notfound__title {
  font-family: var(--font-serif);
  font-size: 28px;
  margin-bottom: 16px;
}

.project-notfound__link {
  font-size: 14px;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-line);
  transition: color var(--transition-fast);
}

.project-notfound__link:hover {
  color: var(--color-text);
}

/* ============================================================
   PHOTO WALL
   ============================================================ */
.photo-wall__header {
  padding: 64px 0;
  border-bottom: 1px solid var(--color-line);
  text-align: center;
}

.photo-wall__header .section__title {
  margin-bottom: 0;
}

.photo-wall__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.photo-wall__item {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  cursor: pointer;
  background: #e8e5db;
}

.photo-wall__item:nth-child(5n) {
  border-right: none;
}

.photo-wall__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.photo-wall--ready .photo-wall__item img {
  opacity: 1;
}


/* Horizontal row — 3 items */
.photo-wall__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.photo-wall__row-item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  cursor: pointer;
  background: #e8e5db;
}

.photo-wall__row-item:last-child {
  border-right: none;
}

.photo-wall__row-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.photo-wall--ready .photo-wall__row-item img {
  opacity: 1;
}


/* Photo lightbox */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.photo-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

/* ============================================================
   ABOUT TEASER — homepage about section
   Row 1: 2 columns | Row 2: 1 column (full width)
   ============================================================ */
.about-teaser {
  /* border-top handled by photo wall items above */
}

.about-teaser__header {
  padding: 64px 0;
  border-bottom: 1px solid var(--color-line);
  text-align: center;
}

.about-teaser__header .section__title {
  margin-bottom: 0;
}

.about-teaser__grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
}

.about-teaser__col {
  padding: 40px;
  border-bottom: 1px solid var(--color-line);
  border-right: 1px solid var(--color-line);
}

.about-teaser__col:nth-child(2) {
  border-right: none;
}

/* Photo column — no padding, image fills edge to edge */
.about-teaser__col--photo {
  padding: 0;
  position: relative;
  min-height: 320px;
}

/* Full-width row — spans both columns */
.about-teaser__col--full {
  grid-column: 1 / -1;
  border-right: none;
}

/* Photo fills column width, 3:4 aspect ratio */
.about-teaser__photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.about-teaser__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Intro text column */
.about-teaser__name {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.about-teaser__role {
  font-size: 14px;
  color: var(--color-muted);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.about-teaser__bio {
  font-size: 15px;
  line-height: 1.8;
  color: #444;
}

.about-teaser__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-line);
  padding-bottom: 4px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.about-teaser__link:hover {
  color: var(--color-text);
  border-color: var(--color-text);
}

/* Skills row (full-width) */
.about-teaser__skills-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 16px;
}

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

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

  .about-teaser__col {
    border-right: none;
    padding: 32px 24px;
  }

  .about-teaser__col--full {
    grid-column: 1;
  }

  .about-teaser__photo {
    max-width: 200px;
  }
}

/* ============================================================
   DETAIL PAGE — 时光机等富文本项目详情页
   ============================================================ */

/* Shared section */
.dp-section {
  padding: 100px 0;
  border-bottom: 1px solid var(--color-line);
}

.dp-section--alt {
  background: #FBF9F5;
}

.dp-section--bg {
  background: #F5F2EB;
}

.dp-section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.dp-section__title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.dp-section__subtitle {
  font-size: 16px;
  color: var(--color-muted);
  margin-bottom: 64px;
}

/* Image placeholders */
.dp-placeholder {
  background: #e8e5db;
  border: 1px solid var(--color-line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dp-placeholder span {
  font-size: 12px;
  font-weight: 500;
  color: #b0ada5;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 16px;
}

.dp-img--4x3 { aspect-ratio: 4 / 3; width: 100%; }
.dp-img--phone { aspect-ratio: 9 / 16; max-width: 320px; width: 100%; margin: 0 auto; }

/* ========== Hero — 全幅图片 + 文字叠加 ========== */
.dp-img--cover { width: 100%; height: 100%; }

.dp-hero {
  position: relative;
  height: 66svh;
  min-height: 420px;
  overflow: hidden;
  border-bottom: 1px solid var(--color-line);
}

.dp-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.dp-hero__bg .dp-placeholder {
  width: 100%;
  height: 100%;
  border: none;
  background: #e0ddd5;
}

.dp-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 40px 32px;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}

.dp-hero__back {
  position: absolute;
  top: 24px;
  left: 40px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.4);
  border-right-color: rgba(255,255,255,0.2);
  border-bottom-color: rgba(255,255,255,0.2);
  padding: 0;
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: all 0.1s ease;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    0 2px 6px rgba(0,0,0,0.2);
}

.dp-hero__back:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.dp-hero__back:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.2),
    0 1px 3px rgba(0,0,0,0.15);
  border-top-color: rgba(255,255,255,0.2);
  border-left-color: rgba(255,255,255,0.2);
  border-right-color: rgba(255,255,255,0.5);
  border-bottom-color: rgba(255,255,255,0.5);
}

.dp-hero__back-arrow {
  padding: 8px 8px 8px 14px;
  font-size: 14px;
  border-right: 1px solid rgba(255,255,255,0.2);
}

.dp-hero__back-text {
  padding: 8px 14px 8px 10px;
}

.dp-hero__content {
  max-width: 780px;
}

.dp-hero__subtitle {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.85);
  margin-bottom: 8px;
}

.dp-hero__title-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.dp-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.dp-hero__intro {
  font-size: clamp(13px, 1.4vw, 16px);
  line-height: 1.5;
  color: rgba(255,255,255,0.7);
  padding-bottom: 2px;
}

.dp-hero__desc {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.65);
  max-width: 480px;
  margin-bottom: 16px;
}

.dp-hero__tags { display: flex; flex-wrap: wrap; gap: 8px; }

.dp-hero__tags .tag {
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.1);
}

/* Scroll hint */
.dp-hero__scroll {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.dp-hero__scroll span {
  display: inline-block;
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.5);
  position: relative;
}

.dp-hero__scroll span::after {
  content: '';
  position: absolute;
  top: 0;
  left: -2.5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  animation: dpScrollDot 2s ease-in-out infinite;
}

@keyframes dpScrollDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(24px); opacity: 0; }
}

/* ========== Overview ========== */
.dp-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px;
  background: var(--color-line);
  border: 1px solid var(--color-line);
}

.dp-overview__card {
  background: var(--color-bg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.dp-overview__card--wide {
  grid-column: span 2;
}

.dp-overview__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.dp-overview__value {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

/* ========== Background ========== */
.dp-background {
  max-width: 680px;
  font-size: 16px;
  line-height: 1.85;
  color: #444;
}

.dp-background p + p { margin-top: 16px; }

.dp-background__highlight {
  margin: 32px 0;
  padding: 24px 0;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.dp-background__highlight p {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

/* ========== Design Principles ========== */
.dp-principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--color-line);
}

.dp-principle {
  padding: 48px 40px 48px 0;
  border-bottom: 1px solid var(--color-line);
  border-right: 1px solid var(--color-line);
}

.dp-principle:nth-child(2n) {
  padding-right: 0;
  padding-left: 40px;
  border-right: none;
}

.dp-principle__num {
  display: block;
  font-family: var(--font-futura);
  font-size: 48px;
  font-weight: 800;
  color: #e0ddd5;
  line-height: 1;
  margin-bottom: 12px;
}

.dp-principle__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
}

.dp-principle__body {
  font-size: 14px;
  line-height: 1.75;
  color: #555;
}

.dp-principle__example {
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-muted);
  font-style: italic;
}

/* ========== Features Grid ========== */
.dp-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-line);
  border: 1px solid var(--color-line);
}

.dp-feature {
  background: var(--color-bg);
  padding: 32px 24px;
}

.dp-feature__num {
  display: block;
  font-family: var(--font-futura);
  font-size: 36px;
  font-weight: 800;
  color: #e0ddd5;
  line-height: 1;
  margin-bottom: 12px;
}

.dp-feature__title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.dp-feature__desc {
  font-size: 13px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 16px;
}

/* ========== UI Showcase ========== */
.dp-showcase {
  display: grid;
  gap: 48px;
  align-items: center;
  padding: 64px 0;
  border-bottom: 1px solid var(--color-line);
}

.dp-showcase:last-child { border-bottom: none; padding-bottom: 0; }

.dp-showcase--single {
  grid-template-columns: 1fr;
}

.dp-showcase--double {
  grid-template-columns: 1fr 1fr;
}

.dp-showcase--mockup {
  grid-template-columns: 1fr 1.2fr;
}

.dp-showcase__text { max-width: 440px; }

.dp-showcase__label {
  font-family: var(--font-futura);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.dp-showcase__title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  margin-bottom: 12px;
}

.dp-showcase__desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-muted);
}

.dp-showcase__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== Showcase List (NutriTrack 2.0) ========== */
.dp-showcase-list .dp-showcase {
  padding: 40px 0;
}

.dp-showcase-list .dp-showcase:last-child {
  border-bottom: 1px solid var(--color-line);
}

/* ========== Future Features ========== */
.dp-future {
  margin-top: 48px;
  padding: 32px;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
}

.dp-future ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.dp-future li {
  font-size: 13px;
  color: var(--color-muted);
  padding: 6px 16px;
  border: 1px solid var(--color-line);
}

/* ========== Workflow ========== */
.dp-workflow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 40px 0;
}

.dp-workflow__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 0 24px;
}

.dp-workflow__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  font-family: var(--font-futura);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
  background: var(--color-bg);
}

.dp-workflow__text {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  max-width: 80px;
  line-height: 1.4;
}

.dp-workflow__arrow {
  position: absolute;
  top: 24px;
  right: -4px;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid var(--color-line);
  border-right: 1.5px solid var(--color-line);
  transform: rotate(45deg);
}

/* ========== Design Thought ========== */
.dp-thought {
  max-width: 680px;
  padding: 40px 0 0;
}

.dp-thought__quote {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-text);
  padding: 0;
  margin: 0 0 32px;
  border: none;
  letter-spacing: -0.01em;
}

.dp-thought__body {
  font-size: 16px;
  line-height: 1.85;
  color: #444;
}

/* ========== Download CTA ========== */
.dp-download {
  text-align: center;
  padding: 32px 0;
}

.dp-download__title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  margin-bottom: 8px;
}

.dp-download__subtitle {
  font-size: 16px;
  color: var(--color-muted);
  margin-bottom: 24px;
}

.dp-download__info {
  font-size: 14px;
  color: var(--color-muted);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dp-download__dot { color: #ccc; }

.dp-download__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 48px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-bg);
  background: var(--color-text);
  border: none;
  text-decoration: none;
  transition: opacity var(--transition-fast);
  letter-spacing: 0.04em;
}

.dp-download__btn:hover { opacity: 0.85; }

.dp-download__icon {
  font-size: 18px;
  font-weight: 700;
}

/* ========== Ending ========== */
.dp-ending {
  padding: 120px 0;
  text-align: center;
  border-top: 1px solid var(--color-line);
}

.dp-ending__inner {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 40px;
}

.dp-ending__title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  margin-bottom: 8px;
}

.dp-ending__subtitle {
  font-size: 18px;
  color: var(--color-muted);
  margin-bottom: 48px;
}

.dp-ending__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 40px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  border: 1px solid var(--color-line);
  text-decoration: none;
  margin-bottom: 64px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.dp-ending__btn:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.dp-ending__tagline {
  font-size: 13px;
  color: #b0ada5;
  letter-spacing: 0.04em;
}

/* ============================================================
   RESPONSIVE — Detail Page
   ============================================================ */
@media (max-width: 768px) {
  .dp-hero { height: 55svh; min-height: 320px; }
  .dp-hero__back { top: 16px; left: 24px; }
  .dp-hero__overlay { padding: 16px 24px 24px; }
  .dp-hero__title-row { flex-direction: column; gap: 4px; }
  .dp-hero__title { white-space: normal; }
  .dp-section { padding: 64px 0; }
  .dp-section__inner { padding: 0 24px; }

  .dp-overview { grid-template-columns: repeat(2, 1fr); }
  .dp-overview__card--wide { grid-column: span 2; }

  .dp-principles { grid-template-columns: 1fr; }
  .dp-principle { padding: 32px 24px; border-right: none; }
  .dp-principle:nth-child(2n) { padding-left: 24px; padding-right: 24px; }

  .dp-features { grid-template-columns: 1fr; }

  .dp-showcase--double,
  .dp-showcase--mockup { grid-template-columns: 1fr; gap: 24px; }
  .dp-showcase { padding: 40px 0; }
  .dp-showcase:nth-child(even) .dp-showcase__text { order: 0; }
  .dp-showcase:nth-child(even) .dp-showcase__visual { order: 0; }

  .dp-workflow { flex-direction: column; gap: 0; }
  .dp-workflow__step { flex-direction: row; gap: 12px; padding: 12px 0; width: 100%; max-width: 300px; }
  .dp-workflow__num { width: 36px; height: 36px; font-size: 12px; margin-bottom: 0; flex-shrink: 0; }
  .dp-workflow__text { text-align: left; max-width: none; }
  .dp-workflow__arrow { display: none; }

  .dp-ending { padding: 80px 0; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 120px 0;
  text-align: center;
}

.footer__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-text);
}

.footer__divider {
  color: #b0ada5;
  font-size: 14px;
}

.footer__copy {
  font-size: 12px;
  color: #b0ada5;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }

  .nav__inner {
    padding: 0 24px;
  }

  .section {
    padding: 64px 0;
  }

  .hero {
    min-height: 100svh;
  }

  .hero .container {
    padding: 80px 0 60px;
  }

  .projects__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .projects__grid::after {
    display: none;
  }

  .works__tabs {
    padding: 0 24px;
  }

  .works__tab {
    margin-right: 24px;
  }

  #worksHeroes {
    grid-template-columns: 1fr;
  }

  .work-hero {
    border-right: none;
    height: 60svh;
    min-height: 300px;
  }

  .work-hero__overlay {
    padding: 20px 24px 16px;
    top: 56px;
  }

  .works__grid {
    grid-template-columns: 1fr;
  }

  .works__card {
    border-right: none;
  }

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

  .works__card:nth-child(3n) {
    border-right: 1px solid var(--color-line);
  }

  .works__card:nth-child(2n) {
    border-right: none;
  }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .about__photo {
    position: static;
    max-width: 320px;
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--color-line);
    padding-bottom: 32px;
    margin-bottom: 0;
  }

  .about__content {
    padding-left: 0;
    padding-top: 32px;
  }

  .project-overview {
    grid-template-columns: 1fr;
  }

  .project-overview__item {
    border-right: none;
    border-bottom: 1px solid var(--color-line);
    padding: 20px 24px;
  }

  .project-overview__item:last-child {
    border-bottom: none;
  }

  .project-section {
    padding: 48px 0;
  }

  .project-section__inner {
    padding: 0 24px;
  }

  .project-hero {
    padding: 48px 0;
  }

  .project-images--2col {
    grid-template-columns: 1fr;
  }

  .skills__group {
    flex-direction: column;
    gap: 8px;
  }

  .modal {
    width: 96vw;
    height: 85vh;
  }

  .modal__close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .nav__links {
    gap: 20px;
  }

  .card__body {
    padding: 16px;
  }

  .card__title {
    font-size: 19px;
  }
}

/* ============================================================
   Matrix 切条 — hero 区域切成百条黑底绿字从上下涌入
   ============================================================ */
.matrix-overlay {
  position: absolute;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  mask-mode: luminance;
  -webkit-mask-mode: luminance;
}

.matrix-strip {
  position: absolute;
  top: 0;
  background: #FDF6E3;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.15;
  color: #8B9D18;
  text-shadow: 0 0 3px #8B9D18;
  animation: stripFlyIn 1.5s ease-out both;
  animation-delay: var(--strip-delay, 0s);
}

.matrix-strip--down {
  top: auto;
  bottom: 0;
  animation-name: stripFlyUp;
}

@keyframes stripFlyIn {
  0%   { transform: translateY(-110%); }
  100% { transform: translateY(0); }
}

@keyframes stripFlyUp {
  0%   { transform: translateY(110%); }
  100% { transform: translateY(0); }
}
