:root {
  --bento-white: rgba(255, 255, 255, 0.96);
  --bento-muted: rgba(232, 239, 250, 0.62);
  --bento-border: rgba(255, 255, 255, 0.16);
  --bento-glow: 255, 255, 255;
}

html,
body {
  min-height: 100%;
  background: transparent;
}

body.about-page.about-bento-page {
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  background: transparent;
}

.about-bento-page .galaxy-container {
  z-index: 0;
  pointer-events: none;
}

.about-bento-main {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100svh;
  padding: 104px clamp(16px, 4vw, 72px) 48px;
}

.magic-bento-section {
  position: relative;
  width: min(1480px, 100%);
  min-height: calc(100svh - 152px);
  margin: 0 auto;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(180px, 1fr);
  gap: clamp(10px, 1.1vw, 18px);
  width: 100%;
  min-height: calc(100svh - 152px);
  margin: 0 auto;
}

#magic-bento-grid:has(> .magic-bento-card:nth-child(6):last-child) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(180px, 1fr));
}

.magic-bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(16px, 1.5vw, 26px);
  border: 1px solid var(--bento-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.018);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018), 0 16px 48px rgba(0, 0, 0, 0.12);
  transform: translate3d(0, 0, 0);
  transition: border-color 260ms ease, box-shadow 260ms ease, background 260ms ease, transform 180ms ease;
  will-change: transform;
  --glow-x: 50%;
  --glow-y: 50%;
  --glow-intensity: 0;
  --glow-radius: 320px;
  --card-image: none;
  --card-rotation-x: 0deg;
  --card-rotation-y: 0deg;
}

.magic-bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.08) 52%, rgba(0, 0, 0, 0.52)), var(--card-image);
  background-position: center;
  background-size: cover;
  opacity: 0.26;
  filter: saturate(0.72) contrast(1.08);
  transform: scale(1.03);
  transition: opacity 420ms ease, transform 700ms cubic-bezier(.2,.7,.2,1), filter 420ms ease;
}

.magic-bento-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(var(--glow-radius) circle at var(--glow-x) var(--glow-y), rgba(var(--bento-glow), calc(var(--glow-intensity) * 0.95)) 0%, rgba(var(--bento-glow), calc(var(--glow-intensity) * 0.32)) 30%, transparent 67%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0.92;
  pointer-events: none;
}

.magic-bento-card:hover {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.22), 0 0 42px rgba(255, 255, 255, 0.08);
}

.magic-bento-card:hover::before {
  opacity: 0.52;
  filter: saturate(0.92) contrast(1.04);
  transform: scale(1.08);
}

.magic-bento-card.is-featured {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 390px;
}

.magic-bento-card__header,
.magic-bento-card__content {
  position: relative;
  z-index: 4;
  display: flex;
}

.magic-bento-card__header {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.magic-bento-card__label,
.magic-bento-card__date {
  color: rgba(255, 255, 255, 0.62);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-transform: uppercase;
}

.magic-bento-card__date {
  text-align: right;
  white-space: nowrap;
}

.magic-bento-card__content {
  flex-direction: column;
  gap: 9px;
  max-width: 94%;
  margin-top: auto;
}

.magic-bento-card__title {
  margin: 0;
  color: var(--bento-white);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: clamp(17px, 1.55vw, 28px);
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.22;
  text-wrap: balance;
}

.magic-bento-card.is-featured .magic-bento-card__title {
  max-width: 8em;
  font-size: clamp(24px, 3vw, 50px);
}

.magic-bento-card__description {
  max-width: 36em;
  color: var(--bento-muted);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.7;
}

.magic-bento-card__orb {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  width: clamp(54px, 6vw, 100px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.035) 30%, transparent 69%);
  box-shadow: inset 0 0 26px rgba(255, 255, 255, 0.08), 0 0 26px rgba(255, 255, 255, 0.08);
  opacity: 0.66;
  pointer-events: none;
  transform: translateZ(24px);
}

.bento-particle {
  position: absolute;
  z-index: 2;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  opacity: 0;
  pointer-events: none;
  animation: bento-particle-drift var(--particle-duration, 4.8s) ease-in-out var(--particle-delay, 0s) infinite;
}

@keyframes bento-particle-drift {
  0%, 100% { opacity: 0; transform: translate3d(0, 8px, 0) scale(.55); }
  35%, 65% { opacity: .85; transform: translate3d(var(--particle-x, 10px), var(--particle-y, -18px), 0) scale(1); }
}

.global-spotlight {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  width: 1px;
  height: 1px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.17) 0%, rgba(255,255,255,.08) 18%, rgba(255,255,255,.03) 34%, transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 320ms ease;
}

.bento-ripple {
  position: absolute;
  z-index: 5;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  animation: bento-ripple-expand 720ms cubic-bezier(.15,.75,.3,1) forwards;
}

@keyframes bento-ripple-expand {
  0% { opacity: .9; transform: translate(-50%, -50%) scale(0); box-shadow: 0 0 0 0 rgba(255,255,255,.35); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(18); box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}

.magic-bento-empty {
  display: grid;
  min-height: 70vh;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  color: var(--bento-muted);
  font-size: 13px;
  letter-spacing: .1em;
}

@media (max-width: 1023px) {
  .about-bento-main {
    padding: 90px 18px 34px;
  }

  .magic-bento-section,
  .card-grid {
    min-height: calc(100svh - 124px);
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(180px, 1fr);
  }

  .magic-bento-card.is-featured {
    min-height: 340px;
  }
}

@media (max-width: 620px) {
  .about-bento-main {
    padding: 78px 12px 24px;
  }

  .magic-bento-section,
  .card-grid {
    min-height: calc(100svh - 102px);
  }

  .card-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(170px, auto);
    gap: 10px;
  }

  .magic-bento-card,
  .magic-bento-card.is-featured {
    grid-column: auto;
    grid-row: auto;
    min-height: 210px;
  }

  .magic-bento-card.is-featured .magic-bento-card__title {
    font-size: 29px;
  }

  .magic-bento-card__description {
    max-width: 80%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .magic-bento-card,
  .magic-bento-card::before,
  .bento-particle,
  .bento-ripple {
    animation: none;
    transition: none;
  }
}
