/* Glass Petal Nebula — global styles (no hard-coded hex in components). */

:root {
  /* Core background (night forest) */
  --c-bg-0: #070A12; /* deepest */
  --c-bg-1: #0B1022; /* base */
  --c-bg-2: #0D1730; /* lifted */
  --c-bg-0-rgb: 7, 10, 18;
  --c-bg-1-rgb: 11, 16, 34;
  --c-bg-2-rgb: 13, 23, 48;

  /* Surface (glass) */
  --c-surface-0: rgba(255, 255, 255, 0.06);
  --c-surface-1: rgba(255, 255, 255, 0.09);
  --c-surface-2: rgba(255, 255, 255, 0.12);
  --c-surface-3: rgba(255, 255, 255, 0.16);

  /* Stroke / border */
  --c-stroke-0: rgba(255, 255, 255, 0.10);
  --c-stroke-1: rgba(255, 255, 255, 0.16);
  --c-stroke-2: rgba(255, 255, 255, 0.22);

  /* Text */
  --c-text-0: rgba(255, 255, 255, 0.92); /* primary */
  --c-text-1: rgba(255, 255, 255, 0.78); /* secondary */
  --c-text-2: rgba(255, 255, 255, 0.62); /* muted */
  --c-text-3: rgba(255, 255, 255, 0.46); /* hint */

  /* Accents (bioluminescent) */
  --c-accent-mint: #62F2D6;
  --c-accent-cyan: #5AA7FF;
  --c-accent-violet: #B19CFF;
  --c-accent-pink: #FF7CCB;
  --c-accent-leaf: #69F08A;
  --c-accent-mint-rgb: 98, 242, 214;
  --c-accent-cyan-rgb: 90, 167, 255;
  --c-accent-violet-rgb: 177, 156, 255;
  --c-accent-pink-rgb: 255, 124, 203;
  --c-accent-leaf-rgb: 105, 240, 138;

  /* Status */
  --c-success: #58F0A8;
  --c-warning: #FFC56B;
  --c-danger: #FF5B7A;
  --c-success-rgb: 88, 240, 168;
  --c-warning-rgb: 255, 197, 107;
  --c-danger-rgb: 255, 91, 122;

  /* Shadow tint */
  --c-shadow-rgb: 0, 0, 0;

  /* Layout */
  --radius-md: 14px;
  --radius-lg: 18px;
  --container-max: 1160px;
  --gutter-desktop: 28px;
  --gutter-mobile: 18px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);

  /* Spotlight vars (set by JS) */
  --mx: 50%;
  --my: 20%;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--c-text-0);
  background:
    radial-gradient(
      1200px 900px at 20% 10%,
      rgba(var(--c-accent-cyan-rgb), 0.12),
      rgba(var(--c-bg-0-rgb), 0) 55%
    ),
    radial-gradient(
      900px 700px at 75% 25%,
      rgba(var(--c-accent-violet-rgb), 0.10),
      rgba(var(--c-bg-0-rgb), 0) 60%
    ),
    radial-gradient(
      900px 700px at 60% 75%,
      rgba(var(--c-accent-leaf-rgb), 0.08),
      rgba(var(--c-bg-0-rgb), 0) 58%
    ),
    linear-gradient(180deg, var(--c-bg-0), var(--c-bg-2));
  font-family:
    "Noto Sans SC",
    "Source Han Sans SC",
    PingFangSC-Regular,
    "PingFang SC",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  line-height: 1.7;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}

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

.container {
  width: min(var(--container-max), calc(100% - var(--gutter-desktop) * 2));
  margin: 0 auto;
}

@media (max-width: 640px) {
  .container {
    width: min(var(--container-max), calc(100% - var(--gutter-mobile) * 2));
  }
}

.skipLink {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-stroke-1);
  color: var(--c-text-0);
  transition: transform 200ms var(--ease-out);
}
.skipLink:focus {
  top: 16px;
}

.topNav {
  position: sticky;
  top: 12px;
  z-index: 50;
}

.topNavInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 60px rgba(var(--c-shadow-rgb), 0.36);
  backdrop-filter: blur(12px);
}

@media (prefers-reduced-motion: reduce) {
  .topNavInner {
    backdrop-filter: none;
  }
}

@media (max-width: 640px) {
  .topNavInner {
    backdrop-filter: blur(10px);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}

.brandMark {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background:
    radial-gradient(
      14px 14px at 30% 30%,
      rgba(var(--c-accent-mint-rgb), 0.55),
      rgba(var(--c-accent-mint-rgb), 0) 65%
    ),
    radial-gradient(
      16px 16px at 70% 65%,
      rgba(var(--c-accent-pink-rgb), 0.40),
      rgba(var(--c-accent-pink-rgb), 0) 70%
    ),
    rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.brandText {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.brandText strong {
  font-size: 14px;
  font-weight: 650;
}
.brandText span {
  font-size: 12px;
  color: var(--c-text-2);
}

.navLinks {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.navLinks a {
  position: relative;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--c-text-1);
  transition:
    background 220ms var(--ease-out),
    color 220ms var(--ease-out),
    transform 220ms var(--ease-out);
}
.navLinks a:hover {
  color: var(--c-text-0);
  background: rgba(255, 255, 255, 0.06);
}
.navLinks a[aria-current="page"] {
  color: var(--c-text-0);
  background:
    linear-gradient(
      90deg,
      rgba(var(--c-accent-mint-rgb), 0.18),
      rgba(var(--c-accent-cyan-rgb), 0.12),
      rgba(var(--c-accent-violet-rgb), 0.12)
    );
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.navLinks a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--c-accent-mint), var(--c-accent-violet));
  opacity: 0.75;
}

.navActions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.iconBtn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--c-text-1);
  cursor: pointer;
  transition:
    transform 220ms var(--ease-out),
    background 220ms var(--ease-out),
    color 220ms var(--ease-out),
    border-color 220ms var(--ease-out);
}
.iconBtn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--c-text-0);
}
.iconBtn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--c-accent-mint-rgb), 0.40);
}

.drawerToggle {
  display: none;
}

@media (max-width: 900px) {
  .navLinks {
    display: none;
  }
  .drawerToggle {
    display: grid;
  }
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}
.drawer[aria-hidden="false"] {
  display: block;
}
.drawerBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(var(--c-bg-0-rgb), 0.65);
}
.drawerPanel {
  position: absolute;
  right: 12px;
  top: 12px;
  width: min(380px, calc(100% - 24px));
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 90px rgba(var(--c-shadow-rgb), 0.44);
  backdrop-filter: blur(12px);
  transform: translateY(-8px);
  opacity: 0;
  transition:
    transform 260ms var(--ease-out),
    opacity 260ms var(--ease-out);
}
.drawer[aria-hidden="false"] .drawerPanel {
  transform: translateY(0);
  opacity: 1;
}
.drawerLinks {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.drawerLinks a {
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: var(--c-text-0);
}
.drawerLinks a[aria-current="page"] {
  background:
    linear-gradient(
      90deg,
      rgba(var(--c-accent-mint-rgb), 0.18),
      rgba(var(--c-accent-violet-rgb), 0.14)
    );
}

main {
  padding: 34px 0 80px;
}

.hero {
  position: relative;
  padding: 64px 0 28px;
}

.heroSpotlight {
  position: absolute;
  inset: -120px -60px -120px -60px;
  pointer-events: none;
  background:
    radial-gradient(
      520px 420px at var(--mx) var(--my),
      rgba(var(--c-accent-mint-rgb), 0.16),
      rgba(var(--c-accent-cyan-rgb), 0.10) 25%,
      rgba(var(--c-bg-0-rgb), 0) 62%
    ),
    radial-gradient(
      640px 520px at calc(var(--mx) + 10%) calc(var(--my) + 8%),
      rgba(var(--c-accent-violet-rgb), 0.12),
      rgba(var(--c-bg-0-rgb), 0) 65%
    );
  opacity: 0.95;
  transform: translateZ(0);
}

.heroInner {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  align-items: start;
}

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

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

.eyebrow {
  font-size: 13px;
  color: var(--c-text-2);
  display: inline-flex;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 999px;
}
.eyebrowDot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: radial-gradient(circle at 40% 40%, var(--c-accent-leaf), rgba(var(--c-accent-leaf-rgb), 0.2));
  box-shadow: 0 0 0 3px rgba(var(--c-accent-leaf-rgb), 0.14);
}

/* 首页主句：siteMeta.tagline，视觉重心 */
.heroStatement {
  margin: 16px 0 0;
  min-height: 1.2em;
  max-width: 22em;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(30px, 4.2vw, 52px);
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: 0.03em;
  color: var(--c-text-0);
  text-wrap: pretty;
  word-break: keep-all;
  line-break: strict;
}

.heroStatementBreak {
  display: block;
  content: "";
}

.heroStatementEm {
  display: inline-block;
  white-space: nowrap;
  background: linear-gradient(
    105deg,
    rgba(var(--c-accent-mint-rgb), 0.95),
    rgba(var(--c-accent-violet-rgb), 0.88)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 520px) {
  .heroStatement {
    max-width: 100%;
  }

  .heroStatementEm {
    white-space: normal;
    display: inline;
  }
}

.h1 {
  margin: 14px 0 0;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 720;
}

.h1--sub {
  margin-top: 20px;
  min-height: 1.1em;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.28;
  font-weight: 650;
  color: var(--c-text-1);
  max-width: 22em;
}

.h1 .accentWord {
  background: linear-gradient(90deg, var(--c-accent-pink), var(--c-accent-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 14px 0 0;
  color: var(--c-text-1);
  font-size: 16.5px;
  max-width: 58ch;
}

.lead--bio {
  margin-top: 18px;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--c-text-2);
  max-width: 52ch;
}

.heroActions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  position: relative;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 220ms var(--ease-out),
    background 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--c-accent-mint-rgb), 0.40);
}
.btnPrimary {
  background:
    linear-gradient(
      90deg,
      rgba(var(--c-accent-leaf-rgb), 0.95),
      rgba(var(--c-accent-mint-rgb), 0.88)
    );
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(5, 10, 16, 0.92);
  box-shadow:
    0 18px 60px rgba(var(--c-shadow-rgb), 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.btnPrimary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 30px 90px rgba(var(--c-shadow-rgb), 0.44),
    0 0 0 1px rgba(255, 255, 255, 0.10) inset,
    0 0 36px rgba(var(--c-accent-mint-rgb), 0.22);
}
.btnSecondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--c-text-0);
}
.btnSecondary:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
}
.btnGhost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--c-text-0);
}
.btnGhost:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 900px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

.glass {
  position: relative;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 60px rgba(var(--c-shadow-rgb), 0.36);
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.10),
      rgba(255, 255, 255, 0.04) 30%,
      rgba(255, 255, 255, 0.02) 100%
    );
  opacity: 0.55;
}
.glassInner {
  position: relative;
  padding: 22px 22px;
}
@media (max-width: 640px) {
  .glassInner {
    padding: 18px 16px;
  }
}

.cardHover {
  transform: translateZ(0);
  transition:
    transform 240ms var(--ease-out),
    border-color 240ms var(--ease-out),
    background 240ms var(--ease-out),
    box-shadow 240ms var(--ease-out);
}
.cardHover:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 30px 90px rgba(var(--c-shadow-rgb), 0.44),
    0 0 40px rgba(var(--c-accent-cyan-rgb), 0.10);
}

.section {
  margin-top: 34px;
}

.sectionHead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.sectionMore {
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.sectionMore:hover {
  color: var(--c-text-0);
}
/* 首页精选作品：双列等宽紧凑卡（非作品页 bento 照搬） */
.homeWorkGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 720px) {
  .homeWorkGrid {
    grid-template-columns: 1fr;
  }
}
.homeWorkCard {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  padding: 0;
}
.homeWorkMedia {
  height: 168px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 12, 18, 0.9);
}
.homeWorkMedia img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.homeWorkBody {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  margin-top: 0;
}
.homeWorkTitle {
  font-size: 17px;
  font-weight: 700;
}
.homeWorkTeaser {
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.homeWorkChips {
  margin-top: 4px;
}
.homeWorkMore {
  margin-top: 4px;
  font-size: 12px;
}
.noteDetailBack {
  text-decoration: none;
}
.noteDetailBack:hover {
  color: var(--c-text-0);
}
.noteDetailBody {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
}

/* 语言切换 */
.langSwitch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}
.langSwitch.is-busy {
  opacity: 0.65;
  pointer-events: none;
}
.langBtn {
  border: 0;
  background: transparent;
  color: var(--c-text-2);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.langBtn.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--c-text-0);
}

/* 关于页生活图集 */
.lifeGallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) {
  .lifeGallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .lifeGallery {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}
.lifeGalleryItem {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(8, 12, 18, 0.85);
  cursor: zoom-in;
  color: inherit;
  text-align: left;
}
.lifeGalleryItem img,
.lifeGalleryItem video {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
}
.lifeGalleryPlay {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  pointer-events: none;
}
.lifeGalleryCaption {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--c-text-2);
}

/* 图集放大层 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.lightbox[aria-hidden="false"] {
  pointer-events: auto;
  opacity: 1;
}
.lightboxBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 14, 0.82);
}
.lightboxPanel {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 960px);
  max-height: 88vh;
  width: 100%;
}
.lightboxClose {
  position: absolute;
  right: -4px;
  top: -44px;
  font-size: 22px;
}
.lightboxMedia img,
.lightboxMedia video {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: contain;
}
.h2 {
  margin: 0;
  font-size: clamp(22px, 2.3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 720;
}
.subtle {
  color: var(--c-text-2);
  font-size: 13px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--c-text-1);
  font-size: 12px;
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    background 220ms var(--ease-out);
}
.chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 720px) {
  .bento {
    grid-template-columns: 1fr;
  }
}

.workCard .glassInner {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
}

.workCardHead {
  margin-top: 12px;
  align-items: flex-start;
  gap: 8px;
}

.workCardHead .subtle {
  font-size: 12px;
  text-align: right;
  max-width: 46%;
}

.media {
  height: 200px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background:
    radial-gradient(
      140px 120px at 30% 35%,
      rgba(var(--c-accent-pink-rgb), 0.22),
      rgba(var(--c-bg-0-rgb), 0) 70%
    ),
    radial-gradient(
      180px 160px at 70% 65%,
      rgba(var(--c-accent-leaf-rgb), 0.16),
      rgba(var(--c-bg-0-rgb), 0) 70%
    ),
    rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.media--cover {
  background: rgba(255, 255, 255, 0.04);
}

/* 完整显示原图/原视频，不裁剪 */
.media--fit-contain {
  height: auto;
  overflow: visible;
}

.media--fit-contain img,
.media--fit-contain video {
  object-fit: contain;
  object-position: center;
}

.media--cover.media--fit-contain {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 10px;
  background: rgba(8, 12, 18, 0.85);
}

.media--cover.media--fit-contain img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 260px;
}

.media--gallery {
  height: auto;
  background: rgba(8, 12, 18, 0.85);
}

.mediaGallery--scroll {
  display: flex;
  gap: 14px;
  padding: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.mediaGallery--scroll img {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  max-height: min(52vh, 320px);
  max-width: min(78vw, 480px);
  border-radius: 12px;
  object-fit: contain;
  scroll-snap-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.media--video.media--fit-contain {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  padding: 12px;
  background: rgba(8, 12, 18, 0.92);
}

.media--video.media--fit-contain video {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(70vh, 520px);
  min-height: 0;
  background: #000;
}

/* 竖版视频：居中、保持比例，两侧留暗边 */
.media--video.media--portrait video {
  max-width: min(100%, 360px);
  max-height: min(75vh, 600px);
}

.workCard--wide .media--cover.media--fit-contain img {
  max-height: 300px;
}

.workCard--wide .mediaGallery--scroll img {
  max-height: min(55vh, 360px);
}

.workCard--video {
  cursor: default;
}

.workCardLink {
  display: inline-flex;
  text-decoration: none;
}

.workCardLink:hover {
  color: var(--c-text-0);
}
.mediaCaption {
  margin-top: 10px;
  color: var(--c-text-2);
  font-size: 13px;
}

.list {
  display: grid;
  gap: 12px;
}

.row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}
.row strong {
  font-weight: 700;
}

.timeline {
  display: grid;
  gap: 10px;
}
.timelineItem {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  align-items: start;
}
.timelineDot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 6px;
  background: radial-gradient(circle at 35% 35%, var(--c-accent-mint), rgba(var(--c-accent-mint-rgb), 0.2));
  box-shadow: 0 0 0 3px rgba(var(--c-accent-cyan-rgb), 0.12), 0 0 22px rgba(var(--c-accent-mint-rgb), 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.timelineLine {
  position: relative;
}
.timelineLine::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 18px;
  bottom: -18px;
  width: 1px;
  background: rgba(255, 255, 255, 0.10);
}

.pinSwap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
  min-height: 86vh;
  align-items: start;
}
@media (max-width: 900px) {
  .pinSwap {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}
.pinLeft {
  position: sticky;
  top: 92px;
  align-self: start;
}
@media (max-width: 900px) {
  .pinLeft {
    position: relative;
    top: auto;
  }
}
.swapStack {
  display: grid;
  gap: 12px;
}
.swapCard {
  opacity: 0.35;
  transform: translateY(10px);
  transition:
    opacity 320ms var(--ease-out),
    transform 320ms var(--ease-out),
    box-shadow 320ms var(--ease-out);
}
.swapCard.isActive {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 30px 90px rgba(var(--c-shadow-rgb), 0.44);
}

.convergeStage {
  position: relative;
  min-height: 220px;
  margin-top: 18px;
}
.petal {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(16px 16px at 35% 35%, rgba(var(--c-accent-pink-rgb), 0.65), rgba(var(--c-accent-pink-rgb), 0) 65%),
    radial-gradient(18px 18px at 70% 65%, rgba(var(--c-accent-cyan-rgb), 0.45), rgba(var(--c-accent-cyan-rgb), 0) 72%),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    0 18px 60px rgba(var(--c-shadow-rgb), 0.36),
    0 0 26px rgba(var(--c-accent-violet-rgb), 0.12);
  backdrop-filter: blur(10px);
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0) scale(var(--s, 1));
  opacity: var(--o, 1);
}

.footer {
  margin-top: 46px;
  padding: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--c-text-2);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 680ms var(--ease-soft),
    transform 680ms var(--ease-soft);
}
.reveal.isIn {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.isIn {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Leaf canvas layer */
.leafCanvas {
  position: fixed;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  opacity: 0.9;
}

/* Plant backdrop (SVG) */
.plantLayer {
  position: fixed;
  inset: 0;
  z-index: 6; /* behind leaves, above background */
  pointer-events: none;
  overflow: hidden;
}

.plantSvg {
  position: absolute;
  right: var(--plant-right, 0px);
  top: var(--plant-top, 64px);
  bottom: auto;
  width: var(--plant-width, min(900px, 56vw));
  max-height: var(--plant-maxh, 78vh);
  height: auto;
  opacity: 0.96;
  transform-origin: 72% 74%;
  transform:
    translate3d(calc((var(--mxn, 0.5) - 0.5) * 8px), calc((var(--myn, 0.2) - 0.5) * 6px), 0)
    rotate(calc((var(--mxn, 0.5) - 0.5) * 0.55deg));
  mix-blend-mode: screen;
  /* Keep copy readable: fade plant towards text side (left). */
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.70) 26%, rgba(0,0,0,1) 54%);
  mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.70) 26%, rgba(0,0,0,1) 54%);
  filter:
    saturate(1.10)
    brightness(calc(0.98 + (var(--mxn, 0.5) * 0.12)))
    contrast(1.08)
    drop-shadow(0 22px 60px rgba(var(--c-shadow-rgb), 0.42))
    drop-shadow(0 0 46px rgba(var(--c-accent-leaf-rgb), 0.14))
    drop-shadow(0 0 34px rgba(var(--c-accent-violet-rgb), 0.10));
}

@media (max-width: 640px) {
  .plantSvg {
    right: var(--plant-right-mobile, -6vw);
    top: var(--plant-top-mobile, 92px);
    bottom: auto;
    width: var(--plant-width-mobile, min(820px, 112vw));
    max-height: var(--plant-maxh-mobile, 64vh);
    opacity: 0.78;
    mix-blend-mode: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plantSvg {
    transform: none;
    filter: saturate(1.02) brightness(0.95);
  }
}

@keyframes plantBreath {
  0% {
    transform:
      translate3d(calc((var(--mxn, 0.5) - 0.5) * 8px), calc((var(--myn, 0.2) - 0.5) * 6px), 0)
      rotate(calc((var(--mxn, 0.5) - 0.5) * 0.55deg))
      scale(1);
    opacity: 0.94;
  }
  50% {
    transform:
      translate3d(calc((var(--mxn, 0.5) - 0.5) * 8px), calc((var(--myn, 0.2) - 0.5) * 6px), 0)
      rotate(calc((var(--mxn, 0.5) - 0.5) * 0.55deg))
      scale(1.020);
    opacity: 0.99;
  }
  100% {
    transform:
      translate3d(calc((var(--mxn, 0.5) - 0.5) * 8px), calc((var(--myn, 0.2) - 0.5) * 6px), 0)
      rotate(calc((var(--mxn, 0.5) - 0.5) * 0.55deg))
      scale(1);
    opacity: 0.94;
  }
}

@media (hover: hover) and (pointer: fine) {
  .plantSvg {
    animation: plantBreath 7.2s var(--ease-soft) infinite;
  }
}

/* Per-page composition tweaks (make each plant feel distinct). */
.plantSvg.plantHome {
  --plant-right: -6px;
  --plant-top: 18px;
  --plant-width: min(980px, 58vw);
  --plant-maxh: 86vh;
  --plant-right-mobile: -10vw;
  --plant-top-mobile: 76px;
  --plant-width-mobile: min(920px, 118vw);
  --plant-maxh-mobile: 62vh;
}
.plantSvg.plantAbout {
  --plant-right: -8px;
  --plant-top: 54px;
  --plant-width: min(980px, 56vw);
  --plant-maxh: 72vh;
  --plant-right-mobile: -8vw;
  --plant-top-mobile: 92px;
}
.plantSvg.plantWorks {
  --plant-right: -16px;
  --plant-top: 38px;
  --plant-width: min(1040px, 60vw);
  --plant-maxh: 74vh;
  --plant-right-mobile: -10vw;
  --plant-top-mobile: 92px;
  filter:
    saturate(1.14)
    brightness(calc(0.98 + (var(--mxn, 0.5) * 0.12)))
    contrast(1.10)
    drop-shadow(0 22px 60px rgba(var(--c-shadow-rgb), 0.40))
    drop-shadow(0 0 44px rgba(var(--c-accent-pink-rgb), 0.12))
    drop-shadow(0 0 30px rgba(var(--c-accent-cyan-rgb), 0.10));
}
.plantSvg.plantNotes {
  --plant-right: -16px;
  --plant-top: 42px;
  --plant-width: min(1040px, 60vw);
  --plant-maxh: 74vh;
  --plant-right-mobile: -10vw;
  --plant-top-mobile: 92px;
}
.plantSvg.plantResume {
  --plant-right: -16px;
  --plant-top: 42px;
  --plant-width: min(1040px, 60vw);
  --plant-maxh: 74vh;
  --plant-right-mobile: -10vw;
  --plant-top-mobile: 92px;
}
.plantSvg.plantContact {
  --plant-right: -18px;
  --plant-top: 18px;
  --plant-width: min(1100px, 64vw);
  --plant-maxh: 76vh;
  --plant-right-mobile: -12vw;
  --plant-top-mobile: 92px;
  opacity: 0.82;
  /* Stronger protection for form readability on left/middle */
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.82) 34%, rgba(0,0,0,1) 64%);
  mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.82) 34%, rgba(0,0,0,1) 64%);
}

/* Content sits above leaves but below nav */
.contentLayer {
  position: relative;
  z-index: 10;
}

