@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&family=Lato:wght@300;400;700&display=swap');

:root {
  --pink: #ff0080;
  --mag: #ff00ff;
  --ink: #26171f;
  --bg: #0d060c;
  --line: rgba(255, 0, 128, 0.26);
  --txt: #f6eef4;
  --dim: #c9b6c4;
  --panel: rgba(38, 23, 31, 0.62);
  --serif: 'EB Garamond', Georgia, 'Songti SC', serif;
  --sans: 'Lato', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: transparent;
  color: var(--txt);
  font: 400 17px/1.78 var(--sans);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: -25vmax;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(34% 38% at 18% 16%, rgba(255, 0, 128, 0.5), transparent 62%),
    radial-gradient(40% 34% at 80% 10%, rgba(255, 0, 255, 0.36), transparent 66%),
    radial-gradient(46% 46% at 64% 84%, rgba(112, 0, 190, 0.42), transparent 70%),
    radial-gradient(30% 30% at 34% 72%, rgba(255, 0, 128, 0.26), transparent 68%),
    conic-gradient(from 210deg at 50% 50%,
      rgba(255, 0, 128, 0.2),
      rgba(255, 0, 255, 0.14),
      rgba(72, 0, 140, 0.24),
      rgba(255, 0, 128, 0.2));
  filter: blur(22px) saturate(125%);
  animation: aurora 36s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.35;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.25) 70%, transparent);
}

@keyframes aurora {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1.02);
    filter: blur(22px) saturate(120%) hue-rotate(0deg);
  }
  50% {
    transform: translate3d(2%, 2%, 0) scale(1.06);
    filter: blur(26px) saturate(140%) hue-rotate(-18deg);
  }
  100% {
    transform: translate3d(-1%, 3%, 0) scale(1.03);
    filter: blur(24px) saturate(130%) hue-rotate(14deg);
  }
}

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

a {
  color: inherit;
}

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--pink), var(--mag), rgba(255, 255, 255, 0));
}

menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--mag);
  outline-offset: 3px;
}

/* 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px clamp(14px, 4vw, 40px);
  background: linear-gradient(180deg, rgba(13, 6, 12, 0.94), rgba(13, 6, 12, 0.6));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  font: 600 20px/1 var(--serif);
  background: conic-gradient(from 140deg, var(--pink), var(--mag), #7a2bff, var(--pink));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 8px 22px rgba(255, 0, 128, 0.34);
  transition: transform 0.3s ease;
}

.mark:hover {
  transform: rotate(-8deg) scale(1.05);
}

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

.mark.small {
  width: 38px;
  height: 38px;
  font-size: 17px;
}

/* 导航：details > summary + menu > li > a */
.nav {
  position: relative;
  flex: none;
}

.nav summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  font-size: 16px;
  letter-spacing: 0.08em;
  user-select: none;
}

.nav summary::-webkit-details-marker {
  display: none;
}

.nav summary::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s ease;
}

.nav[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.nav summary:hover {
  background: rgba(255, 0, 128, 0.16);
}

.nav menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  min-width: min(600px, 84vw);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(22, 11, 20, 0.97);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.55);
}

.nav menu a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav menu a:hover,
.nav menu a:focus-visible {
  color: #fff;
  background: rgba(255, 0, 128, 0.2);
}

/* 搜索 */
.find {
  display: flex;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}

.find input {
  min-height: 44px;
  width: min(230px, 32vw);
  min-width: 0;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--txt);
  font: 400 16px var(--sans);
}

.find input::placeholder {
  color: #b09baa;
}

.find button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--pink), var(--mag));
  color: #fff;
  font: 700 16px var(--sans);
  letter-spacing: 0.06em;
  cursor: pointer;
}

.find button:hover {
  filter: brightness(1.12);
}

/* 首屏 */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  align-items: center;
  gap: clamp(22px, 5vw, 64px);
  min-height: 70vh;
  padding: clamp(30px, 6vw, 74px) clamp(16px, 5vw, 56px);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 22px 22px, 88px 88px, 88px 88px;
  mask-image: radial-gradient(70% 70% at 50% 45%, #000 20%, transparent 78%);
  opacity: 0.7;
}

.hero-shot {
  position: relative;
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(255, 0, 128, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.hero-shot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(152deg, rgba(255, 0, 128, 0.4), transparent 52%, rgba(255, 0, 255, 0.34));
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  will-change: transform;
}

.hero-txt {
  text-align: center;
}

h1 {
  margin: 0 0 18px;
  font: 600 clamp(2rem, 4.6vw, 3.4rem) / 1.18 var(--serif);
  letter-spacing: 0.02em;
  background: linear-gradient(100deg, #ffffff 8%, #ffd6ea 42%, #ff9de0 72%, #ffffff 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 42ch;
  margin: 0 auto;
  color: var(--dim);
  font-size: 17px;
  line-height: 1.9;
}

/* 主体 */
main div[id] {
  scroll-margin-top: 104px;
}

.wrap {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 44px);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 58px) clamp(16px, 4vw, 40px);
}

.rail {
  position: sticky;
  top: 92px;
  padding: 18px 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.36);
}

.rail h2 {
  margin: 0 0 10px;
  font: 600 17px/1.4 var(--serif);
  letter-spacing: 0.18em;
  color: #fff;
}

.rail hr {
  margin: 0 0 10px;
}

.rail menu {
  display: grid;
  gap: 2px;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 8px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.09);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.rail a:hover,
.rail a:focus-visible {
  color: #fff;
  padding-left: 14px;
}

/* 正文 */
.content {
  min-width: 0;
}

.paper {
  padding: clamp(20px, 3.4vw, 46px);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(178deg, rgba(38, 23, 31, 0.62), rgba(20, 11, 18, 0.44));
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.42);
  overflow-wrap: break-word;
  word-break: break-word;
}

.paper div + div {
  margin-top: clamp(34px, 5vw, 64px);
  padding-top: clamp(22px, 3vw, 38px);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.paper h2 {
  margin: 0 0 10px;
  font: 600 clamp(1.5rem, 2.7vw, 2.05rem) / 1.3 var(--serif);
  letter-spacing: 0.02em;
  color: #fff;
}

.paper h3 {
  margin: 1.6em 0 0.5em;
  font: 600 1.18rem/1.5 var(--serif);
  letter-spacing: 0.04em;
  color: #ffdcf0;
}

.paper hr {
  margin: 0 0 18px;
  max-width: 320px;
}

.paper p {
  margin: 0 0 1.05em;
  color: #ece0e9;
}

.paper ul,
.paper ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
}

.paper li {
  margin-bottom: 0.4em;
}

.paper a {
  color: #ffb0d8;
  text-underline-offset: 3px;
}

.paper blockquote {
  margin: 0 0 1.2em;
  padding: 12px 18px;
  border-left: 2px solid var(--mag);
  background: rgba(255, 0, 255, 0.08);
  color: #f2e3ee;
}

.paper strong {
  color: #fff;
}

.paper img {
  border-radius: 4px;
  margin: 0.4em 0 1.2em;
}

/* 页脚 */
.foot {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 58px) clamp(16px, 5vw, 56px) 26px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(24, 12, 21, 0.55), rgba(9, 4, 8, 0.9));
}

.foot h2 {
  margin: 0 0 8px;
  font: 600 16px/1.5 var(--serif);
  letter-spacing: 0.16em;
  color: #fff;
}

.foot hr {
  margin: 0 0 10px;
  max-width: 96px;
}

.foot menu {
  display: grid;
  gap: 1px;
}

.foot a:not(.mark) {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
}

.foot a:not(.mark):hover {
  color: #fff;
}

.f-name {
  margin: 12px 0 6px;
  font: 600 18px/1.4 var(--serif);
  letter-spacing: 0.08em;
  color: #fff;
}

.f-note {
  margin: 0;
  color: #bda9b8;
  font-size: 16px;
  line-height: 1.75;
}

.f-end p {
  margin: 0;
  color: #b6a3b1;
  font-size: 16px;
  line-height: 1.8;
  word-break: break-word;
}

/* 移动端 */
@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .find {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .find input {
    width: 100%;
    flex: 1 1 auto;
  }

  .nav {
    position: static;
  }

  .nav menu {
    position: absolute;
    top: calc(100% - 2px);
    left: 10px;
    right: 10px;
    width: auto;
    min-width: 0;
    max-height: 62vh;
    overflow-y: auto;
    padding: 8px;
  }

  .nav menu a {
    min-height: 44px;
    white-space: normal;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 22px;
  }

  .hero-img {
    aspect-ratio: 16 / 11;
  }

  .wrap {
    grid-template-columns: 1fr;
    padding-top: 20px;
  }

  .rail {
    position: static;
    order: 2;
  }

  .content {
    order: 1;
  }

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

@media (max-width: 560px) {
  body {
    font-size: 16.5px;
  }

  .nav menu {
    left: 8px;
    right: 8px;
  }

  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .foot {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body::before {
    animation: none;
  }

  .mark,
  .nav summary::after,
  .rail a {
    transition: none;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
